package net.wenku8.reader.view.common

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel

class ConfirmViewModel : ViewModel() {
    var show by mutableStateOf(false)
    var title by mutableStateOf("")
    var text by mutableStateOf("")
    var event by mutableStateOf({ })

    fun show(text: String, title: String? = null, event : () -> Unit){
        if (title != null){
            this.title = title
        }
        this.text = text
        this.event = event
        show = true
    }
}
